New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@prezly/slate-hyperscript

Package Overview
Dependencies
Maintainers
5
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@prezly/slate-hyperscript

Hyperscript helpers for creating Slate documents with JSX

0.1.8
Source
npm
Version published
Maintainers
5
Created
Source

@prezly/slate-hyperscript

Hyperscript helpers for creating Slate documents with JSX.

Version License

Description

This is a copy of slate-hyperscript package into our code (v0.58.0).

The only changes done to this code are:

  • formatting this code with prettier
  • adding /* eslint-disable */ comments at the top of these files so that ESLint does not complain
  • prefixing unused function arguments with _ to avoid TS6133

Why

We need createText function in our code and slate-hyperscript package does not export it.

Why do we need createText function in our code

Slate uses createText function for handling <text> elements in hyperscript. This collides with <text> elements from React TypeScript definitions. That's why we need a different tag name to represent text elements from Slate. We chose h-text for that tag name (and actually apply h- prefix for all other custom tag names). But to make it work we need createText function.

See src/createHyperscript.ts to see how it's composed.

Brought to you by Prezly.

FAQs

Package last updated on 15 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts